package cn.mw.cmdb.entity;

import cn.mw.components.mongodb.anno.AutoId;
import cn.mw.components.mongodb.anno.CMDBProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Document("mw_cmdbmd_instance_import_history_info")
@Schema(description = "实例导入历史")
public class InstanceImportHistoryInfo {
    @CMDBProperty(searchType = PropertyTypeString.ID, searchPrefix = "_")
    @AutoId
    @Schema(description = "id")
    private String id;

    @Schema(description = "名称")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String name;

    @Schema(description = "操作时间")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String operateDate;

    @Schema(description = "操作人")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String operator;

    @Schema(description = "操作人ID")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private Long operatorId;

    @Schema(description = "操作类型")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String operateType;

    @Schema(description = "操作结果")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String operateResult;

    @Schema(description = "成功数量")
    @CMDBProperty(searchType = PropertyTypeString.ID)
    private Integer successCount;

    @Schema(description = "失败数量")
    @CMDBProperty(searchType = PropertyTypeString.ID)
    private Integer failedCount;

    @Schema(description = "上传文件ID")
    @CMDBProperty(searchType = PropertyTypeString.ID)
    private String fileId;

    @Schema(description = "是否回滚")
    @CMDBProperty(searchType = PropertyTypeString.ID)
    private Boolean isRollBack = false;
}
